Due 1/26 by the start of class.

Review Stepping Stones report

Read/scan through the 2019 Stepping Stones report to get a feel for the selected metrics, their organization, documentation, and justifications or explanations.

Submit your brief (e.g., one or two paragraph) responses to the Stepping Stones slack channel.

Working in R

Download this zipped file and save the (unzipped) folder (learningR) where you can find it on your computer. Within the folder there is

Start an R/Rstudio session by double-clicking on learnignR.Rproj. Start a new .R script (New File –> R Script) that does the following:

  1. Adds comments at the top that define the scripts purpose, author, and any other document information you feel should be included.
  2. Loads the tidyverse package.
  3. Reads in all three .csv files (using read_csv()), giving each a relevant name. How many variables and observations does each file have? (Provide answers in comments within the script.)
  4. Examines the structure of each file (using str() or glimpse()). Do the variables have the same type (e.g., characters, numbers, logicals, etc.) across all three data sets?
  5. Generates summary measures of each variable either the Charlottesville or Albemarle file. Do the variables take on the range of values you expected?
  6. View the Charlottesville file in the data viewer (e.g., use View() or click on the name of the data frame in the Global Environment pane). Pick any variable you like and sort the data by that variable - in what year is that variable the highest? The lowest? Answer the same question (for the samer variable) for the Albemarle file.
  7. Using the dplyr functions filter() and select(), along with the pipe command %>%, write a command that starts with the Charlottesville data frame, filters for the year 2016, and selects the variable voter_reg (percent of voting-age-population that is registered to vote). What percent of Charlotteville residents were registered in 2016? Repeat the command for the Albemarle data frame – what percent of Albemarle residents were registered in 2016?

Save the script into the scripts folder. When complete, submit this file to me via direct message on slack (give it a name like week1_mpc.R as I’ll be adding everyone’s to the same script folder in my own version of this folder!)

Artwork by @allison_horst

Artwork by @allison_horst